package cn.zwx.learn.mybatis.example.demo.mapper;

import cn.zwx.learn.mybatis.example.croe.annotation.ZwxSelect;
import cn.zwx.learn.mybatis.example.demo.entity.UserEntity;

/**
 * @author zhangwenxue
 */
public interface UserMapper {

    /**
     * 根据主键ID查询用户信息
     * @param id 主键ID
     * @return UserEntity
     */
    UserEntity selectByPrimaryId(Long id);

    /**
     * 注解实现 根据主键ID查询用户信息
     * @param id 主键ID
     * @return UserEntity
     */
    @ZwxSelect("SELECT * FROM t_user where id=?")
    UserEntity selectByPrimaryId2(Long id);
}
